import request from '@/utils/request'

export function batchComment(data) {
    return request({
        url: `comment/api/send/batch`,
        method: 'post',
        data
    })
}

export function batchProgress(batchNo) {
    return request({
        url: `comment/api/send/batch/${batchNo}/progress`,
        method: 'get',
    })
}

export function batchDetails(batchNo,params) {
    return request({
        url: `comment/api/send/batch/${batchNo}/details`,
        method: 'get',
        params
    })
}

export function batchList(params) {
    return request({
        url: `comment/api/list/batch/list`,
        method: 'get',
        params
    })
}

export function batchDelete(batchNo) {
    return request({
        url: `comment/api/list/batch/${batchNo}`,
        method: 'delete',
    })
}

export function batchDeletes(batchNos) {
    return request({
        url: `comment/api/list/batch/delete`,
        method: 'delete',
        data: batchNos
    })
}

export function batchInfoUpdate(data) {
    return request({
        url: `comment/api/send/batch/update`,
        method: 'put',
        data
    })
}

export function taskResume(batchNo) {
    return request({
        url: `comment/api/send/batch/${batchNo}/resume`,
        method: 'post',
    })
}

export function exportSuccessCommentUrls(batchNos) {
    return request({
        url: `comment/api/list/batch/export-urls`,
        method: 'post',
        data: batchNos
    })
}

export function refreshData(batchNos) {
    return request({
        url: `comment/api/list/sync/batch`,
        method: 'post',
        data: batchNos
    })
}
